package cn.zktr.Personnel.model.pojos;

import java.io.Serializable;
import javax.persistence.*;
import java.sql.Timestamp;
import java.util.List;


/**
 * The persistent class for the per_tng_rus database table.
 * 
 */
@Entity
@Table(name="per_tng_rus")
@NamedQuery(name="PerTngRus.findAll", query="SELECT p FROM PerTngRus p")
public class PerTngRus implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(name="PER_TNG_RUS_RUSID_GENERATOR", sequenceName="SEQ1",allocationSize=1,initialValue=1)
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="PER_TNG_RUS_RUSID_GENERATOR")
	private int rusid;

	private Timestamp rusdate;

	private String rusmiaos;

	private String rusname;

	private String rustime;

	//bi-directional many-to-one association to PerPmsEmp
	@ManyToOne
	@JoinColumn(name="EMPID")
	private PerPmsEmp perPmsEmp;

	//bi-directional many-to-one association to PerPmsZJnxx
	@ManyToOne
	@JoinColumn(name="JNXXID")
	private PerPmsZJnxx perPmsZJnxx;

	//bi-directional many-to-one association to PerTngXks
	@OneToMany(mappedBy="perTngRus")
	private List<PerTngXks> perTngXks;

	public PerTngRus() {
	}

	public int getRusid() {
		return this.rusid;
	}

	public void setRusid(int rusid) {
		this.rusid = rusid;
	}

	public Timestamp getRusdate() {
		return this.rusdate;
	}

	public void setRusdate(Timestamp rusdate) {
		this.rusdate = rusdate;
	}

	public String getRusmiaos() {
		return this.rusmiaos;
	}

	public void setRusmiaos(String rusmiaos) {
		this.rusmiaos = rusmiaos;
	}

	public String getRusname() {
		return this.rusname;
	}

	public void setRusname(String rusname) {
		this.rusname = rusname;
	}

	public String getRustime() {
		return this.rustime;
	}

	public void setRustime(String rustime) {
		this.rustime = rustime;
	}

	public PerPmsEmp getPerPmsEmp() {
		return this.perPmsEmp;
	}

	public void setPerPmsEmp(PerPmsEmp perPmsEmp) {
		this.perPmsEmp = perPmsEmp;
	}

	public PerPmsZJnxx getPerPmsZJnxx() {
		return this.perPmsZJnxx;
	}

	public void setPerPmsZJnxx(PerPmsZJnxx perPmsZJnxx) {
		this.perPmsZJnxx = perPmsZJnxx;
	}

	public List<PerTngXks> getPerTngXks() {
		return this.perTngXks;
	}

	public void setPerTngXks(List<PerTngXks> perTngXks) {
		this.perTngXks = perTngXks;
	}

	public PerTngXks addPerTngXk(PerTngXks perTngXk) {
		getPerTngXks().add(perTngXk);
		perTngXk.setPerTngRus(this);

		return perTngXk;
	}

	public PerTngXks removePerTngXk(PerTngXks perTngXk) {
		getPerTngXks().remove(perTngXk);
		perTngXk.setPerTngRus(null);

		return perTngXk;
	}

}